//封装cookie

import Cookies from 'js-cookie'
var tokenKey =''
//获取token
function getToken(){
    // setToken()
    return Cookies.get('tokenKey')
}
//设置token的函数
function setToken(key){
    console.log(key);
    Cookies.set('tokenKey', key)
}
//移除token
function removeToken(){
    return Cookies.remove(tokenKey)
}

const cookie = {
    getToken,
    setToken,
    removeToken
}

export default cookie